import { useState, useEffect } from 'react'
import { getNodeListApi } from '@/services/authApi'

// 列表
export const useNodeList = (): Array<IAuthType.AuthList> => {
  const [data, setData] = useState<IAuthType.AuthList[]>([])

  const loadData = async () => {
    let ret = await getNodeListApi()
    setData(ret.data)
  }
  useEffect(() => {
    loadData()
  }, [])
  return data
}
